// 网络请求
import { getUrl } from '@/api/home'

import { HOMETYPE_SET_HOME } from '@/store/types/homeTypes'

const homeActionCreator = data => {
    return {
        type: HOMETYPE_SET_HOME,
        data
    }
}

export const getHome = () => async dispatch =>{
    let ret = await getUrl();
    
    dispatch(homeActionCreator(ret.data))
}